<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
 <style>
     *{
         padding: 0;
         margin: 0;
     }
     
     .left{
         position: absolute;
         top: 80px;
         left: 0;
     }
     .right{
         position: absolute;
         top: 80px;
         right: 0;
     }
     img{
         width: 200px;
         height: 500px;
     }

 </style>
</head>
<body>
          
       <div class="left">
       <img src="/1.jpg">
       </div>
       <div class="right">
        <img src="/1.jpg">
        </div>


         <script>
             $(function()
             {
                 //绑定滑动事件
                 $(window).bind("scroll",function()
                 {
                  //获取文本框的下啦高度
                  var h = $ (document).scrollTop();
                  $(".left,.right").css("top",h+80);
                 })
             })
         </script>

</body>
</html>